# Makefile



APP1	:= sendevent
APP2	:= getevent
APP3	:= evtest
APP4	:= tsevent
TARGET	:= $(APP1) $(APP2) $(APP3) $(APP4)

all:$(TARGET)


$(APP1):$(APP1).o
	$(CC) -o $@ $^ $(LDFLAGS)
	$(STRIP) $@

$(APP2):$(APP2).o
	$(CC) -o $@ $^ $(LDFLAGS)
	$(STRIP) $@

$(APP3):$(APP3).o
	$(CC) -o $@ $^ $(LDFLAGS)
	$(STRIP) $@

$(APP4):$(APP4).o
	$(CC) -o $@ $^ $(LDFLAGS) -lm
	$(STRIP) $@

%.o:%.c
	$(CC) -c -o $@ $< $(CFLAGS)

%.o:%.cpp
	$(CXX) -c -o $@ $< $(CFLAGS)

clean:
	@rm -rf *.o *.d $(TARGET)
